﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Smith.ImageConverter
{
    public class PercentageResize : BaseResize, IResize
    {
        public PercentageResize(double perc)
        {
            Percentage = perc;
        }

        protected override Size GetNewSize(int width, int height)
        {
            return new Size(
                Convert.ToInt32(width * Percentage), 
                Convert.ToInt32(height * Percentage));
        }

        public double Percentage { get; private set; }
    }
}
